package com.macro.mall.wx.domain;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;
import java.util.Map;

@Configuration
public class H5Scene {
    /**
     * h5支付固定传"h5_info"
     */
    private final String h5_info = "h5_info" ;
    /**
     * 场景类型
     */
    private String type;
    /**
     * 应用名
     */
    private String app_name;
    /**
     * bundle_id
     */
    private String bundle_id;
    /**
     * 包名
     */
    private String package_name;
    /**
     * WAP网站URL地址
     */
    @Value("${wx.wap_url}")
    private String wap_url;
    /**
     * WAP 网站名
     */
    @Value("${wx.wap_name}")
    private String wap_name;

    /**
     * 为wap支付提供
     *
     */
    public Map<String, H5Scene> wapPay() {
        Map<String, H5Scene> map = new HashMap<>();
        H5Scene h5Scene = new H5Scene();
        h5Scene.setType("Wap");
        h5Scene.setWap_url(this.wap_url);
        h5Scene.setWap_name(this.wap_name);
        map.put(this.h5_info, h5Scene);
        return map;
    }

    public String getH5_info() {
        return h5_info;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getApp_name() {
        return app_name;
    }

    public void setApp_name(String app_name) {
        this.app_name = app_name;
    }

    public String getBundle_id() {
        return bundle_id;
    }

    public void setBundle_id(String bundle_id) {
        this.bundle_id = bundle_id;
    }

    public String getPackage_name() {
        return package_name;
    }

    public void setPackage_name(String package_name) {
        this.package_name = package_name;
    }

    public String getWap_url() {
        return wap_url;
    }

    public void setWap_url(String wap_url) {
        this.wap_url = wap_url;
    }

    public String getWap_name() {
        return wap_name;
    }

    public void setWap_name(String wap_name) {
        this.wap_name = wap_name;
    }

}